﻿using InventoryManagementSystem.DataModel;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.IO;
using System.Linq;
using Windows.Foundation;
using Windows.Foundation.Collections;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Controls.Primitives;
using Windows.UI.Xaml.Data;
using Windows.UI.Xaml.Input;
using Windows.UI.Xaml.Media;
using Windows.UI.Xaml.Navigation;
using Infrastructure.UI;

namespace InventoryManagementSystem
{
    public sealed partial class InventoryPage : InventoryManagementSystem.Common.LayoutAwarePage
    {
        IEnumerable<Product> products;

        public InventoryPage()
        {
            this.InitializeComponent();

            this.EnablePrivacyPolicy(PrivacyPolicy.RunXiaDianQi);
        }

        protected override void LoadState(Object navigationParameter, Dictionary<String, Object> pageState)
        {
            products = DataStore.GetProducts();

            DefaultViewModel["Products"] = products;
        }

        protected override void SaveState(Dictionary<String, Object> pageState)
        {
        }
    }
}
